package teacher.action;

import java.io.InputStream;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class downPat extends ActionSupport
{
	private String inputPath;

	public void setInputPath(String value)
	{
		inputPath = value;
	}

	public InputStream getTargetFile() throws Exception
	{
		
		if(inputPath==null||inputPath.equals(""))
		{
			this.setInputPath(ActionContext.getContext().get("inputpath").toString());
		}

		return ServletActionContext.getServletContext()
			.getResourceAsStream(inputPath);
	}
}

